package com.qf.limit.entity;

import java.util.Date;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.qf.limit.commons.base.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * (User)表实体类
 *
 * @author makejava
 * @since 2024-09-10 09:34:07
 */
@Data
@Accessors(chain = true)
public class User extends BaseEntity {
    //账号-学号
    @NotBlank(message = "用户名不能为空")
    @Length(min = 4, max = 20, message = "用户名的长度必须在{min}到{max}之间！")
    private String username;
    //密码
    @NotBlank(message = "密码不能为空!")
    @Length(min = 6, max = 20,message = "密码的长度必须在{min}到{max}之间")
    private String password;
    //昵称
    @NotBlank(message = "昵称不能为空!")
    private String nickname;
    //邮箱地址
    @NotBlank(message = "邮箱不能为空!")
    @Email(message = "邮箱地址不正确")
    private String email;
    //头像
    private String header;
    //昵称的拼音
    private String pinyin;
}

